Data Science for Business Professionals by Probyto Data Science and Consulting Pvt. Ltd
Author:Probyto Data Science and Consulting Pvt. Ltd. [Probyto Data Science and Consulting Pvt. Ltd.]
Language: eng
Format: epub
ISBN: 9789389423280
Publisher: BPB Publications
Published: 2020-05-15T00:00:00+00:00
#Import the library
import sys
#Print the arguments passed to the script
argument_1 = sys.argv[1]
argument_2 = sys.argv[2]
print("
The First argument passed is ", argument_1, "
The Second argument passed is ", argument_2)
Now, we will call the above script with two arguments; let's say Hello and 5. The script should catch the arguments and make them available as two arguments values:
!Python Code_9_3_Example_sys_args.py Hello 5
The First argument passed is Hello
The Second argument passed is 5
We now will modify our script of the data pipeline to see if it can take the limit as command line arguments and fetch as many records as required by the user. The following script is the modified script to show the use of argv in data pipeline arguments. Save the script as Code_9_4_Command_line_data-pipeline.py and run it from console to see how the results differ for two different arguments:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6841)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6818)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6701)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6490)
Driving Data Quality with Data Contracts by Andrew Jones(6442)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6189)
Learning SQL by Alan Beaulieu(6008)
Weapons of Math Destruction by Cathy O'Neil(5801)
Big Data Analysis with Python by Ivan Marin(5410)
Data Engineering with dbt by Roberto Zagni(4419)
Solidity Programming Essentials by Ritesh Modi(4066)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3928)
Pandas Cookbook by Theodore Petrou(3631)
Blockchain Basics by Daniel Drescher(3308)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2914)
Feature Store for Machine Learning by Jayanth Kumar M J(2822)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2804)
Mastering Python for Finance by Unknown(2748)
